import type { App } from 'vue';
import { createPinia } from 'pinia';
//持久化存储
import { createPersistedState } from 'pinia-plugin-persistedstate';
const pinia = createPinia();
// 全局注册 pinia
export function setupStore(app: App<Element>) {
  pinia.use(
    createPersistedState({
      auto: true //启用所有Store默认持久化
    })
  );
  app.use(pinia);
}

export * from './modules/user';
export * from './modules/category';
export { pinia };
